package com.bw.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/***************************
 FileAction:

 CreateTime:2022-08-19 10:05
 Author:Aaking-aline
 ****************************/
public class JDBC {
	private static String driver = "com.mysql.cj.jdbc.Driver";
	private static String url = "jdbc:mysql://localhost:3306/test2";
	private static String user = "root";
	private static String pass = "root";

	static{
		try {
			Class.forName(driver);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}

	public static Connection getConnecton() throws SQLException {
		return DriverManager.getConnection(url,user,pass);
	}
}
